<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddCsToWechatOffiaccountMessageFunctionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('wechat_offiaccount_message_functions', function (Blueprint $table) {
            //
			$table->string('customer_service_account',50)->after('function')->comment('客服账户')->nullable()->default('');
			$table->tinyInteger('is_transfer')->after('function')->comment('是否转发客服')->nullable()->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('wechat_offiaccount_message_functions', function (Blueprint $table) {
            //
            $table->dropColumn('customer_service_account');
            $table->dropColumn('is_transfer');
        });
    }
}
